package com.muchfish.reactor.api;

import reactor.core.publisher.Mono;

public class MonoSinkErrorExample {
    public static void main(String[] args) {
        Mono.create(monoSink -> {
                    monoSink.error(new RuntimeException("Simulated error")); // 发送错误信号
                })
                .subscribe(
                        System.out::println,
                        error -> System.err.println("Error: " + error.getMessage())
                );
    }
}
